The present invention relates to program preparation methods, and particularly to a program preparation method suitable for preparation of processing programs having complicated data structures.
In the past, as a method for visualizing a program to enhance the efficiency of preparation, a method using a program diagram represented by a flow chart has been used. There is also known an apparatus in which a two-dimensional chart is directly input on CRT to enhance the efficiency, as in the apparatus disclosed in Japanese Patent Laid-Open No. 3039/1983.
The above-described prior art enables the two-dimensional visualization and display of controls such as selection, repetition and the like in programs. In the prior art, no consideration has been given to the visualization of data themselves. There gives rise to a problem in that in a program which principally deals with the operation of the data construction, the contents processed are not defined. This problem will be described briefly with reference to the drawings.
FIG. 14 is a flow chart of a divisional processing which constitutes a center portion of a quick sort program for sorting a plurality of data. The divisional processing herein termed means that elements of array data A are rearranged, so that a first group of elements (for example, n) of values smaller than a divisioned central value suitably assigned will be elements A(1),A(2), . . . A(n) which are small in number while a second group of elements (for example, N-n) of values larger than M will be elements A(n+1), . . . A(N) which are large in number. In the divisional processing, judgement is first made, starting A(1) out of elements A(1)-A(N) in array A, whether the respective elements are larger than M (Steps 900-904); when an element (for example, A(k)) smaller than M is first detected, judgement is made, starting A(N), whether the respective elements are smaller than M (Steps 905-907); and when an element (for example, A(l)) larger than M is first detected, the element A(k) is replaced by A(l) (Steps 908-910). Thereafter, the same processing is repeated (Steps 902-910). As will be apparent from FIG. 14, in the flow chart, the program control construction such as the judgement of conditions, a repetition (for example, Steps 904 and 907), are illustrated and defined, however, the data construction such as the positional relationship of the elements in the array is not visualized, which is not sufficient to intuitively understand the processing contents.